package com.eastfair.pay.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.boot.service.SuperService;
import com.eastfair.pay.dto.ApplyRefundDTO;
import com.eastfair.pay.dto.ApplyRefundPageQuery;
import com.eastfair.pay.dto.RefundDTO;
import com.eastfair.pay.entity.ApplyRefund;
import com.eastfair.pay.vo.ApplyRefundVO;
import org.springframework.web.bind.annotation.RequestBody;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 业务接口
 * 退款申请
 * </p>
 *
 * @author clm
 * @date 2022-06-08
 */
public interface ApplyRefundService extends SuperService<ApplyRefund> {
     /**
      * 分页查询退款申请
      * @param params
      * @return
      */
     Page<ApplyRefundVO> queryPageList(PageParams<ApplyRefundPageQuery> params);

     /**
      * 退款申请保存
      * @param applyRefundDTO
      * @return
      */
     void saveApplyRefund(ApplyRefundDTO applyRefundDTO);

     /**
      * 确认退款
      * @param applyRefundDTO
      * @return
      */
     void  saveApplyRefundCnfirm(@RequestBody ApplyRefundDTO applyRefundDTO);
     /**
      * @Author clm
      * @Description //审核
      * @Date 11:34 2023/2/14
      * @Param [applyRefundDTO]
      * @return void
      **/
    void updateById(ApplyRefundDTO applyRefundDTO);

    /**
     * 修改业务审核状态
     * @param applyRefundDTO
     */
    void updateBizRefundState(ApplyRefundDTO applyRefundDTO);

    /**
     * @Author clm
     * @Description //接受退款申请
     * @Date 14:19 2023/2/20
     * @Param [applyRefundDTO]
     **/
    void acceptApplyRefund(ApplyRefundDTO applyRefundDTO);

    /**
     * @Author clm
     * @Description //更新
     * @Date 14:38 2023/2/20
     * @Param
     * @return
     **/
    void updateApplyRefund(ApplyRefundDTO applyRefundDTO);
    /**
     * @Author clm
     * @Description //获取退款总金额
     * @Date 11:14 2023/2/24
     * @Param []
     * @return
     **/
    BigDecimal getRefundTotalAmount();
    /**
     * @Author clm
     * @Description //财务审核
     * @Date 11:14 2023/3/3
     * @Param []
     * @return
     **/
    void financialExamine(ApplyRefundDTO applyRefundDTO);

    /**
     * 通过业务主键集合查询发票申请状态集合
     * @param buinessIds
     * @return
     */
    List<ApplyRefundVO> queryRefundExamineState(List<Long> buinessIds);

    Boolean onlineRefund(RefundDTO dto);
}
